// 项目总路由文件
angular.module('route', [
    'tab.route',
    'home.route',
    'personalcenter.route',
    'gesture.route',
    'accountbalance.route',
    'password.route',
    'detailaccountChoose.route',
    'detailaccount.route',
    'invitation.route',
    'goods.route',
    'capitalflow.route',
    'login.route',
    'statequery.route',
    'myorder.route',
    'myorder-gwb.route',
    'fundsquest.route',
    'sumrequest.route',
    'taskchoose.route',
    'pay.route',
    'approve.route',
    'approve-detail.route',
    'smartgain.route',
    //新加
    'information.route',
    'approve-information.route',
    'myorder-pay.route',
    //'qrscanner.route'
    'payhistory.route',
])
    .config(function($stateProvider, $urlRouterProvider) {
        $stateProvider
        var passwordxx= window.localStorage.getItem('passwordxx');

        console.log(passwordxx);
        if(passwordxx==null){
            // 启动之后默认跳转的地址
            $urlRouterProvider.otherwise('/tab/login');
        }else {
            // 启动之后默认跳转的地址
            $urlRouterProvider.otherwise('/tab/gesture');
        }
        //// 启动之后默认跳转的地址
        //$urlRouterProvider.otherwise('/tab/login');

    });
